/**
 * Created by user on 2015/9/1.
 */




module.exports = function (app) {

// 登录
    var loginUser = require('../../controllers/backoffice/backOffice-adminUser-controller');
    app.post('/rest/' + RESTFullServiceVersion + '/backoffice/admin/login', loginUser.userLogin);


    var menu = require('../../controllers/mis/system/menu-controller');
    app.post('/rest/' + RESTFullServiceVersion + '/backoffice/menu/menuList/:page/:size', menu.menuList);
    app.post('/rest/' + RESTFullServiceVersion + '/backoffice/menu/menuList', menu.menuAllList);
    app.post('/rest/' + RESTFullServiceVersion + '/backoffice/menu/menuAdd', menu.menuAdd);
    app.post('/rest/' + RESTFullServiceVersion + '/backoffice/menu/menuDelete', menu.menuDelete);
    app.post('/rest/' + RESTFullServiceVersion + '/backoffice/menu/menuEdit', menu.menuEdit);


    var user = require('../../controllers/mis/system/user-controller');
    app.post('/rest/' + RESTFullServiceVersion + '/backoffice/user/userList/:page/:size', user.userList);
    app.post('/rest/' + RESTFullServiceVersion + '/backoffice/user/userAdd', user.userAdd);
    app.post('/rest/' + RESTFullServiceVersion + '/backoffice/user/userDelete', user.userDelete);
    app.post('/rest/' + RESTFullServiceVersion + '/backoffice/user/userEdit', user.userEdit);
    app.post('/rest/' + RESTFullServiceVersion + '/mis/user/changePassword', user.changePassword);

    var role = require('../../controllers/mis/system/role-controller');
    app.post('/rest/' + RESTFullServiceVersion + '/mis/role/roleList/:page/:size', role.roleList);
    app.post('/rest/' + RESTFullServiceVersion + '/mis/role/roleList', role.roleAllList);
    app.post('/rest/' + RESTFullServiceVersion + '/mis/role/roleAdd', role.roleAdd);
    app.post('/rest/' + RESTFullServiceVersion + '/mis/role/roleEdit', role.roleEdit);
    app.post('/rest/' + RESTFullServiceVersion + '/mis/role/roleDelete', role.roleDelete);


    var log = require('../../controllers/mis/system/log-controller');
    app.post('/rest/' + RESTFullServiceVersion + '/mis/log/logList/:page/:size', log.logList);

    var api = require('../../controllers/mis/system/api-controller');
    app.post('/rest/'+ RESTFullServiceVersion + '/mis/api/apiList/:page/:size',api.apiList);
    //app.post('/rest/'+ RESTFullServiceVersion + '/mis/api/apiRankList/:page/:size',api.apiRankList);
    app.post('/rest/'+ RESTFullServiceVersion + '/mis/api/apiCodeList/:page/:size',api.apiCodeList);

    var splishScreen = require('../../controllers/mis/master/splashScreen-controller.js');
    app.post('/rest/' + RESTFullServiceVersion + '/mis/master/splashScreenAdd', splishScreen.addSplashScreen);
    app.post('/rest/' + RESTFullServiceVersion + '/mis/master/splashScreenList/:page/:size', splishScreen.splashScreenList);
    app.get('/rest/' + RESTFullServiceVersion + '/mis/master/splashScreenDel/:id', splishScreen.splashScreenDel);
    app.post('/rest/' + RESTFullServiceVersion + '/mis/master/splashScreenEdit', splishScreen.splashScreenEdit);
    app.get('/rest/' + RESTFullServiceVersion + '/mis/master/splashScreenLatestStartDate', splishScreen.splashScreenLatestStartDate);
    app.post('/rest/' + RESTFullServiceVersion + '/mis/master/splashScreenValuateDateOverlap', splishScreen.splashScreenValuateDateOverlap);
};